<template>
    <div>
        <h2>我总共有{{ money }}元</h2>
        <button @click="eat">吃饭</button>
    </div>
</template>
<script>
export default{
    data(){
        return{
            money:2000
        }
    },
    methods:{
        eat(){
            this.money=this.money-100
        }
    }

}
</script>